package edu.mse.camel.client.uml.collab.actions;

import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;

public class OpenDiagramInCollaborationEditorHelper {
	
	public static IEditorPart openEditor(IWorkbenchPage page, IEditorInput editorInput, String editorID)
			throws PartInitException {
		if (page == null) {
			page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
		}
		return page.openEditor(editorInput, editorID);
	}

}
